package classScore;

import java.io.FileInputStream;
import java.io.IOException;
import java.net.URL;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;

import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;

public class netWork {

	public static Document doc(String url) throws IOException {
		
			Properties p=new Properties();
			p.load(new FileInputStream(".\\resoures\\config.properties"));
		
			Map<String,String> cookies=null;
			cookies=new HashMap<String,String>();
			cookies.put("SERVERID",p.getProperty("SERVERID"));
			cookies.put("_uab_collina", p.getProperty("_uab_collina"));
			cookies.put("acw_tc", p.getProperty("acw_tc"));
			cookies.put("login_token", p.getProperty("login_token"));
			cookies.put("teachweb", p.getProperty("teachweb"));
			
				Document doc=Jsoup.connect(
						url).cookies(cookies).get();
						
				
				return doc;
		
			
	}

	
}
